Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(len(cons(X, Z))) → LEN(Z)
PROPER(add(X1, X2)) → ADD(proper(X1), proper(X2))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
ADD(mark(X1), X2) → ADD(X1, X2)
FST(ok(X1), ok(X2)) → FST(X1, X2)
PROPER(add(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(fst(X1, X2)) → FST(active(X1), X2)
PROPER(from(X)) → FROM(proper(X))
ADD(ok(X1), ok(X2)) → ADD(X1, X2)
ACTIVE(add(X1, X2)) → ADD(active(X1), X2)
PROPER(s(X)) → S(proper(X))
PROPER(fst(X1, X2)) → FST(proper(X1), proper(X2))
ACTIVE(fst(X1, X2)) → ACTIVE(X2)
ACTIVE(fst(X1, X2)) → FST(X1, active(X2))
PROPER(len(X)) → PROPER(X)
ACTIVE(fst(X1, X2)) → ACTIVE(X1)
ACTIVE(from(X)) → FROM(s(X))
FROM(ok(X)) → FROM(X)
S(ok(X)) → S(X)
CONS(mark(X1), X2) → CONS(X1, X2)
FST(X1, mark(X2)) → FST(X1, X2)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
TOP(mark(X)) → PROPER(X)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
ACTIVE(fst(s(X), cons(Y, Z))) → FST(X, Z)
LEN(ok(X)) → LEN(X)
PROPER(add(X1, X2)) → PROPER(X1)
ADD(X1, mark(X2)) → ADD(X1, X2)
TOP(ok(X)) → ACTIVE(X)
ACTIVE(len(X)) → ACTIVE(X)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(from(X)) → PROPER(X)
FST(mark(X1), X2) → FST(X1, X2)
ACTIVE(len(X)) → LEN(active(X))
ACTIVE(from(X)) → ACTIVE(X)
LEN(mark(X)) → LEN(X)
TOP(ok(X)) → TOP(active(X))
ACTIVE(fst(s(X), cons(Y, Z))) → CONS(Y, fst(X, Z))
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(len(cons(X, Z))) → S(len(Z))
PROPER(len(X)) → LEN(proper(X))
ACTIVE(add(X1, X2)) → ACTIVE(X2)
ACTIVE(from(X)) → S(X)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(add(X1, X2)) → ADD(X1, active(X2))
PROPER(fst(X1, X2)) → PROPER(X1)
PROPER(fst(X1, X2)) → PROPER(X2)
ACTIVE(from(X)) → FROM(active(X))
ACTIVE(from(X)) → CONS(X, from(s(X)))

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(len(cons(X, Z))) → LEN(Z)
PROPER(add(X1, X2)) → ADD(proper(X1), proper(X2))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
ADD(mark(X1), X2) → ADD(X1, X2)
FST(ok(X1), ok(X2)) → FST(X1, X2)
PROPER(add(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(fst(X1, X2)) → FST(active(X1), X2)
PROPER(from(X)) → FROM(proper(X))
ADD(ok(X1), ok(X2)) → ADD(X1, X2)
ACTIVE(add(X1, X2)) → ADD(active(X1), X2)
PROPER(s(X)) → S(proper(X))
PROPER(fst(X1, X2)) → FST(proper(X1), proper(X2))
ACTIVE(fst(X1, X2)) → ACTIVE(X2)
ACTIVE(fst(X1, X2)) → FST(X1, active(X2))
PROPER(len(X)) → PROPER(X)
ACTIVE(fst(X1, X2)) → ACTIVE(X1)
ACTIVE(from(X)) → FROM(s(X))
FROM(ok(X)) → FROM(X)
S(ok(X)) → S(X)
CONS(mark(X1), X2) → CONS(X1, X2)
FST(X1, mark(X2)) → FST(X1, X2)
ACTIVE(add(s(X), Y)) → ADD(X, Y)
TOP(mark(X)) → PROPER(X)
ACTIVE(add(s(X), Y)) → S(add(X, Y))
ACTIVE(fst(s(X), cons(Y, Z))) → FST(X, Z)
LEN(ok(X)) → LEN(X)
PROPER(add(X1, X2)) → PROPER(X1)
ADD(X1, mark(X2)) → ADD(X1, X2)
TOP(ok(X)) → ACTIVE(X)
ACTIVE(len(X)) → ACTIVE(X)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(from(X)) → PROPER(X)
FST(mark(X1), X2) → FST(X1, X2)
ACTIVE(len(X)) → LEN(active(X))
ACTIVE(from(X)) → ACTIVE(X)
LEN(mark(X)) → LEN(X)
TOP(ok(X)) → TOP(active(X))
ACTIVE(fst(s(X), cons(Y, Z))) → CONS(Y, fst(X, Z))
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(len(cons(X, Z))) → S(len(Z))
PROPER(len(X)) → LEN(proper(X))
ACTIVE(add(X1, X2)) → ACTIVE(X2)
ACTIVE(from(X)) → S(X)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(add(X1, X2)) → ADD(X1, active(X2))
PROPER(fst(X1, X2)) → PROPER(X1)
PROPER(fst(X1, X2)) → PROPER(X2)
ACTIVE(from(X)) → FROM(active(X))
ACTIVE(from(X)) → CONS(X, from(s(X)))

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 9 SCCs with 24 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LEN(ok(X)) → LEN(X)
LEN(mark(X)) → LEN(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LEN(ok(X)) → LEN(X)
LEN(mark(X)) → LEN(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ADD(ok(X1), ok(X2)) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ADD(ok(X1), ok(X2)) → ADD(X1, X2)
ADD(X1, mark(X2)) → ADD(X1, X2)
ADD(mark(X1), X2) → ADD(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(ok(X)) → FROM(X)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FROM(mark(X)) → FROM(X)
FROM(ok(X)) → FROM(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(X1, mark(X2)) → FST(X1, X2)
FST(ok(X1), ok(X2)) → FST(X1, X2)
FST(mark(X1), X2) → FST(X1, X2)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FST(X1, mark(X2)) → FST(X1, X2)
FST(ok(X1), ok(X2)) → FST(X1, X2)
FST(mark(X1), X2) → FST(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(add(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(len(X)) → PROPER(X)
PROPER(from(X)) → PROPER(X)
PROPER(fst(X1, X2)) → PROPER(X2)
PROPER(fst(X1, X2)) → PROPER(X1)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(add(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(add(X1, X2)) → PROPER(X1)
PROPER(from(X)) → PROPER(X)
PROPER(len(X)) → PROPER(X)
PROPER(fst(X1, X2)) → PROPER(X1)
PROPER(fst(X1, X2)) → PROPER(X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(fst(X1, X2)) → ACTIVE(X2)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ACTIVE(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(from(X)) → ACTIVE(X)
ACTIVE(len(X)) → ACTIVE(X)
ACTIVE(fst(X1, X2)) → ACTIVE(X1)

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(fst(X1, X2)) → ACTIVE(X2)
ACTIVE(add(X1, X2)) → ACTIVE(X1)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(add(X1, X2)) → ACTIVE(X2)
ACTIVE(from(X)) → ACTIVE(X)
ACTIVE(fst(X1, X2)) → ACTIVE(X1)
ACTIVE(len(X)) → ACTIVE(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = 2·x1   
POL(active(x1)) = 2·x1   
POL(add(x1, x2)) = 2·x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(fst(x1, x2)) = 2·x1 + 2·x2   
POL(len(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = 2·x1   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
len(mark(X)) → mark(len(X))
len(ok(X)) → ok(len(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
from(mark(X)) → mark(from(X))
from(ok(X)) → ok(from(X))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(mark(X)) → TOP(proper(X))
The remaining pairs can at least be oriented weakly.

TOP(ok(X)) → TOP(active(X))
Used ordering: Polynomial interpretation [25]:

POL(0) = 1   
POL(TOP(x1)) = x1   
POL(active(x1)) = x1   
POL(add(x1, x2)) = 1 + x1 + x2   
POL(cons(x1, x2)) = x1   
POL(from(x1)) = 1 + x1   
POL(fst(x1, x2)) = 1 + x1 + x2   
POL(len(x1)) = 1 + x1   
POL(mark(x1)) = 1 + x1   
POL(nil) = 1   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   

The following usable rules [17] were oriented:

cons(mark(X1), X2) → mark(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
from(mark(X)) → mark(from(X))
fst(X1, mark(X2)) → mark(fst(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
add(mark(X1), X2) → mark(add(X1, X2))
len(ok(X)) → ok(len(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
len(mark(X)) → mark(len(X))
proper(len(X)) → len(proper(X))
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
proper(0) → ok(0)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
len(mark(X)) → mark(len(X))
len(ok(X)) → ok(len(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
from(mark(X)) → mark(from(X))
from(ok(X)) → ok(from(X))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = 2·x1   
POL(active(x1)) = 2·x1   
POL(add(x1, x2)) = x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(from(x1)) = 2·x1   
POL(fst(x1, x2)) = 2·x1 + 2·x2   
POL(len(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = 2·x1   
POL(s(x1)) = x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ UsableRulesReductionPairsProof
QDP
                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
len(mark(X)) → mark(len(X))
len(ok(X)) → ok(len(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
from(mark(X)) → mark(from(X))
from(ok(X)) → ok(from(X))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

active(fst(0, Z)) → mark(nil)
active(add(0, X)) → mark(X)
active(len(nil)) → mark(0)

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 1   
POL(TOP(x1)) = x1   
POL(active(x1)) = 2·x1   
POL(add(x1, x2)) = 2·x1 + 2·x2   
POL(cons(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(fst(x1, x2)) = 2·x1 + x2   
POL(len(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(nil) = 2   
POL(ok(x1)) = 2·x1   
POL(s(x1)) = x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ UsableRulesReductionPairsProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
len(mark(X)) → mark(len(X))
len(ok(X)) → ok(len(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
from(mark(X)) → mark(from(X))
from(ok(X)) → ok(from(X))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

TOP(ok(X)) → TOP(active(X))

Strictly oriented rules of the TRS R:

active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
len(ok(X)) → ok(len(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))

Used ordering: POLO with Polynomial interpretation [25]:

POL(TOP(x1)) = x1   
POL(active(x1)) = 2·x1   
POL(add(x1, x2)) = 1 + 2·x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(fst(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(len(x1)) = 2·x1   
POL(mark(x1)) = x1   
POL(ok(x1)) = 1 + 2·x1   
POL(s(x1)) = x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ UsableRulesReductionPairsProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ RuleRemovalProof
QDP
                                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

active(from(X)) → mark(cons(X, from(s(X))))
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(from(X)) → from(active(X))
active(len(X)) → len(active(X))
len(mark(X)) → mark(len(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
from(mark(X)) → mark(from(X))
from(ok(X)) → ok(from(X))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(ok(X)) → ok(s(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.